//数据状态
const dataStatusOptions = [
    {
        label: "创建",
        value: 1,
    },
    {
        label: "审核中",
        value: 2,
    },
    {
        label: "已审核",
        value: 3,
    },
];
//应付结算状态
const settlementStatusOptions = [
    {
        label: "为空",
        value: 1,
    },
    {
        label: "到期付款",
        value: 2,
    },
    {
        label: "退票",
        value: 3,
    },
];
//应收结算状态
const settlementRecStatusOptions = [
    {
        label: "为空",
        value: 1,
    },
    {
        label: "拆分",
        value: 2,
    },
    {
        label: "背书",
        value: 3,
    },
    {
        label: "背书退回",
        value: 4,
    },
    {
        label: "贴现",
        value: 5,
    },
    {
        label: "到期收款",
        value: 6,
    },
    {
        label: "退票",
        value: 7,
    },
    {
        label: "质押",
        value: 8,
    },
    {
        label: "撤押",
        value: 9,
    },
];

export const receiveStatus = {
    null: {
        label: "为空",
        type: 1,
    },
    split: {
        label: "拆分",
        type: 2,
    },
    endorsement: {
        label: "背书",
        type: 3,
    },
    endorsementBack: {
        label: "背书退回",
        type: 4,
    },
    discount: {
        label: "贴现",
        type: 5,
    },
    receipt: {
        label: "到期收款",
        type: 6,
    },
    refund: {
        label: "退票",
        type: 7,
    },
    pledge: {
        label: "质押",
        type: 8,
    },
    unpledge: {
        label: "撤押",
        type: 9,
    },
    detail: {
        label: "详情",
    },
    add: {
        label: "新增",
    },
    edit: {
        label: "编辑",
    },
};

export function handleDataStatus(type) {
    const status = dataStatusOptions.find((e) => e.value === type);
    if (status) {
        return status.label || "--";
    }
    return "--";
}
export function handleSettlementStatus(type) {
    const status = settlementStatusOptions.find((e) => e.value === type);
    if (status) {
        return status.label || "--";
    }
    return "--";
}
export function handleRecSettlementStatus(type) {
    const status = settlementRecStatusOptions.find((e) => e.value === type);
    if (status) {
        return status.label || "--";
    }
    return "--";
}
export function handleCurrency(data, type) {
    const status = data.find((e) => e.value == type);
    if (status) {
        return status.label || "--";
    }
    return "--";
}
